package com.pth.admin.action;

import com.opensymphony.xwork2.ActionSupport;
import com.pth.model.Notice;
import com.pth.service.NoticeService;
import com.pth.utils.timeUtil;

public class AddNoticeAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Notice notice;
	private NoticeService noticeService;

	@Override
	public String execute() throws Exception {
		
		notice.setNpublishtime(timeUtil.getCurrentDate());
		
		noticeService.add(notice);
		
		return SUCCESS;
	
	}


	public Notice getNotice() {
		return notice;
	}

	public NoticeService getNoticeService() {
		return noticeService;
	}

	public void setNotice(Notice notice) {
		this.notice = notice;
	}
	
	
	public void setNoticeService(NoticeService noticeService) {
		this.noticeService = noticeService;
	}
	
}
